<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>志愿一点通</title>
    <link href="${ctxStatic}/bootstrap/3.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="${ctxStatic}/app/css/master.css">
</head>
<body>
<nav class="topbar bluebg">
    <a class="icon-arrow icon-return" href="${wechat}/search"></a>
    <h1>大学排行</h1>
    <a class="nav-right " href="#" id="kemuTypeBtn" style="margin-right:10px;display: none;" rel="${type}">
        <c:choose>
            <c:when test="${type eq '5'}">文科</c:when>
            <c:when test="${type eq '1'}">理科</c:when>
            <c:otherwise>理科</c:otherwise>
        </c:choose>
    </a>
</nav>

<div class="wrap">
    <section class="rankbox">
        <c:if test="${!empty newListItems}">
            <ol>
                <c:forEach items="${newListItems}" var="item" varStatus="status">
                    <li>
                        <em>${status.index+1}</em>
                        <a href="${item.url}" target="_self">
                            <img class="school-minilogo" src="${item.picUrl}">
                            <span>${fn:substring(item.title,0,20)}...</span>
                            <span class="frt font-org"></span>
                        </a>
                    </li>
                </c:forEach>
            </ol>
        </c:if>
        <c:if test="${empty newListItems}">暂无数据</c:if>
    </section>
</div>

<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/bootstrap/3.3.2/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/app/js/main.js" type="text/javascript"></script>
<script style="text/javascript">
$(document).ready(function(){
    $("#kemuTypeBtn").click(function(){
        var kemuType = null;
        if($("#kemuTypeBtn").attr("rel") == "1"){
            kemuType = 5;
        }else if($("#kemuTypeBtn").attr("rel") == "5"){
            kemuType = 1;
        }
        window.location.href = "${wechat}/rankList?type="+kemuType;
    });
});
</script>
</body>
</html>